<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="./css/reset.css">
    <link rel="stylesheet" href="./font-awesome-4.7.0/css/font-awesome.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_1437112_e8nfviri4c4.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_1438060_ob992ttlg1.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_1438081_l8g61gv0ta.css">
    <style>
        body {
            min-width: 1200px;
            overflow: hidden;
        }

        #bigbox {
            width: 100%;
            border: 1px solid #f2f2f2;
            background: #f2f2f2;

        }

        #logo {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 60px;
            border: 1px solid white;
            background: #ffffff;
        }

        .logo {
           
            width: 6%;
            margin-left: 4%;
            margin-top: 15px;
            /* border: 1px solid red; */
        }
        
        
        

        #logo p {
            line-height: 60px;
            font-size: 14px;
            float: right;
            margin-right: 2%;
            color: #696969;
        }

        #sidebar {
            width: 16%;
            height: 868px;
            /* border: 1px solid 3c9688; */
            background: #20222a;
            float: left;
            overflow: hidden;
            position: fixed;
            left: 0;
            top: 60px;
        }

        #sidebar p {
            width: 100%;
            height: 62px;
            /* border: 1px solid#3c9688; */
            /* background: #3c9688; */
            color: white;
            line-height: 60px;
            cursor: pointer;
            background: #20222a;
        }

        .analyze {
            width: 100%;
            height: 62px;
            /* border: 1px solid#3c9688; */
            /* background: #3c9688; */
            color: white;
            line-height: 60px;
            cursor: pointer;
            background: #20222a;
            margin-left: 80px;
        }

        #sidebar p:hover {
            border-left: 3px solid #3c9688;
        }

        #sidebar p span {
            margin-left: 80px;
        }

        .a1 {
            margin-left: 2px;
            height: 248px;
            background: #3c9688;
            color: white;
            line-height: 60px;
            cursor: pointer;
            text-align: center;
            display: none;
        }

        iframe {
            width: 82%;
            height: 860px;
            /* border: 1px solid red; */
            float: right;
            margin-right: 1%;
            background: #f2f2f2;

        }

        /* .a1 li {
            border-bottom: 1px solid white;
        } */
    </style>
</head>

<body>
    <div id="bigbox">
        <div id="logo">
          <img class="logo" src="./img/logo.png" alt="">
            <p>退出</p>
            <p>量子矩阵</p>
        </div>
        <div id="sidebar">
        
            <p> <span class="icon iconfont icon-shouye"></span> 首页</p>
            <p> <span class="fa fa-mortar-board"></span> 院校管理</p>
            <p> <span class="icon iconfont icon-xueshengguanli"></span> 学生管理</p>
            <p> <span class="icon iconfont icon-yejiguanli"></span> 业绩管理 </p>
            <div class="analyze"> <span class="icon iconfont icon-shujufenxi"></span> 数据分析
                <span id="ospan" class="icon iconfont icon-triangle-bottom"></span></div>
            <ul class="a1">
                <p>市场统计</p>
                <p>口碑统计</p>
                <p>就业统计</p>
                <p>就业率统计</p>
            </ul>
            <p> <span class="icon iconfont icon-icon-test"></span> 提醒功能</p>
        </div>
        <iframe src="./BX_schoolInfo.html" frameborder="0"></iframe>
    </div>
</body>

</html>
<script>
    var analyze = document.getElementsByClassName("analyze");
    var oa = document.getElementsByClassName("a1");
    var ospan = document.getElementById("ospan");
    var iFrame = document.getElementsByTagName("iframe")[0];
    for (var i = 0; i < analyze.length; i++) {
        analyze[i].index = i;
        analyze[i].onoff = true;
        analyze[i].onclick = function () {
            if (this.onoff) {
                oa[this.index].style.display = "block";
                ospan.className = "icon iconfont icon-triangle-top";
                analyze[this.index].onoff = false;
            } else {
                oa[this.index].style.display = "none";
                ospan.className = "icon iconfont icon-triangle-bottom";
                analyze[this.index].onoff = true;
            }

        }
    }
    //点击变色
    var osidebar = document.getElementById("sidebar");
    var op = osidebar.getElementsByTagName("p");
    op[0].style.background = "#3c9688";
    for (var i = 0; i < op.length; i++) {
        console.log(2)
        op[i].index = i;
        op[0].onclick = function () {
            for (var j = 0; j < op.length; j++) {
                op[j].style.background = '';
            }
            this.style.background = "#3c9688";
            iFrame.src = "homepage.html";
        }
    }
    op[1].onclick = function () {
        for (var j = 0; j < op.length; j++) {
            op[j].style.background = '';
        }
        iFrame.src = "BX_schoolManage.html";
        this.style.background = "#3c9688";
    }
    op[2].onclick = function () {
        for (var j = 0; j < op.length; j++) {
            op[j].style.background = '';
        }
        iFrame.src = "homepage.html";
        this.style.background = "#3c9688";
    }
    op[3].onclick = function () {
        for (var j = 0; j < op.length; j++) {
            op[j].style.background = '';
        }
        iFrame.src = "homepage.html";
        this.style.background = "#3c9688";
    }
    op[4].onclick = function () {
        for (var j = 0; j < op.length; j++) {
            op[j].style.background = '';
        }
        iFrame.src = "BX_schoolManage.html";
        this.style.background = "#3c9688";
    }
    op[5].onclick = function () {
        for (var j = 0; j < op.length; j++) {
            op[j].style.background = '';
        }
        iFrame.src = "homepage.html";
        this.style.background = "#3c9688";
    }
    op[6].onclick = function () {
        for (var j = 0; j < op.length; j++) {
            op[j].style.background = '';
        }
        iFrame.src = "BX_schoolManage.html";
        this.style.background = "#3c9688";
    }
    op[7].onclick = function () {
        for (var j = 0; j < op.length; j++) {
            op[j].style.background = '';
        }
        iFrame.src = "homepage.html";
        this.style.background = "#3c9688";
    }
    op[8].onclick = function () {
        for (var j = 0; j < op.length; j++) {
            op[j].style.background = '';
        }
        iFrame.src = "homepage.html";
        this.style.background = "#3c9688";
    }
</script>